package com.liugl.activitylifecycletest

import android.content.Intent
import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import utils.L

class NormalActivity : AppCompatActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_normal)

        val data = intent.getBundleExtra("data")
        L.d("${data?.getString("s_key")}")
    }

    override fun onBackPressed() {
        val intent = Intent()
        val b = Bundle()
        b.putString("result", "I am come back")
        intent.putExtra("re", b)
        setResult(RESULT_OK, intent)

        finish()
    }
}